/**
 * Copyright &copy; 2015-2020 <a href="http://www.easyhis.com/">easyhis</a> All rights reserved.
 */
package com.easy.dfcshop.entity;

import com.easy.common.utils.excel.annotation.ExcelField;
import com.easy.core.persistence.BaseEntity;
import com.easy.modules.sys.entity.User;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 校验码Entity
 * @author waylen chi
 * @version 2018-01-02
 */
public class VerifyCode extends BaseEntity<VerifyCode> {
	
	private static final long serialVersionUID = 1L;
	private Integer verifyId;		// ID自增
	private String id;		// UUID
	private String mobile;		// 手机号
	private String getip;		// 发送IP
	private String verifyCode;		// 校验码
	private Date createTime;		// 创建时间
	private User createBy;		// 创建人
	private Date verifyTime;		// 校验时间
	private String status;		// 状态0-未校验，1-已校验
	
	public VerifyCode() {
		super();
	}

	public VerifyCode(String id){
		this.id = id;
	}

	public VerifyCode(Integer verifyId){
		this.verifyId = verifyId;
	}

	@NotNull(message="UUID")
	@ExcelField(title="UUID", align=2, sort=0)
	@JsonIgnore
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@NotNull(message="ID自增不能为空")
	@ExcelField(title="ID自增", align=2, sort=0)
	public Integer getVerifyId() {
		return verifyId;
	}

	public void setVerifyId(Integer verifyId) {
		this.verifyId = verifyId;
	}

	@ExcelField(title="手机号", align=2, sort=1)
	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	
	@ExcelField(title="发送IP", align=2, sort=2)
	public String getGetip() {
		return getip;
	}

	public void setGetip(String getip) {
		this.getip = getip;
	}
	
	@ExcelField(title="校验码", align=2, sort=3)
	public String getVerifyCode() {
		return verifyCode;
	}

	public void setVerifyCode(String verifyCode) {
		this.verifyCode = verifyCode;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="创建时间不能为空")
	@ExcelField(title="创建时间", align=2, sort=4)
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	@ExcelField(title="创建人", align=2, sort=5)
	public User getCreateBy() {
		return createBy;
	}

	public void setCreateBy(User createBy) {
		this.createBy = createBy;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="校验时间", align=2, sort=6)
	public Date getVerifyTime() {
		return verifyTime;
	}

	public void setVerifyTime(Date verifyTime) {
		this.verifyTime = verifyTime;
	}
	
	@ExcelField(title="状态0-未校验，1-已校验", align=2, sort=7)
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
	
}